-- GENERATED SPELL FOR [Aligar the Tormentor] --


function spell0_3898(pUnit, Event) --@Battle Stance,Self--
pUnit:FullCastSpellOnTarget(7165,pUnit)
pUnit:RegisterEvent('Sorts_3898', 684, 1)
end

function spell1_3898(pUnit, Event) --@Hamstring,n/a--
pUnit:FullCastSpellOnTarget(9080,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3898', 10255, 1)
end

function spell2_3898(pUnit, Event) --@Heroic Strike,n/a--
pUnit:FullCastSpellOnTarget(25712,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3898', 548, 1)
end

function Sorts_3898(pUnit, Event)
local choix_sorts_3898 = math.random(0, 2)
if choix_sorts_3898 == 0 then
pUnit:RegisterEvent('spell0_3898', 1, 1)
end
if choix_sorts_3898 == 1 then
pUnit:RegisterEvent('spell1_3898', 1, 1)
end
if choix_sorts_3898 == 2 then
pUnit:RegisterEvent('spell2_3898', 1, 1)
end
end

function mob3898_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3898', math.random(1500, 3000), 1)
end

function mob3898_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3898_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3898_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3898, 1, 'mob3898_Action')
RegisterUnitEvent(3898, 2, 'mob3898_Leave')
RegisterUnitEvent(3898, 3, 'mob3898_Kill')
RegisterUnitEvent(3898, 4, 'mob3898_Die')
